package com.ruoyi.web.controller.admin.newSystem;

import com.ruoyi.admin.domain.SystemUserLogin;
import com.ruoyi.admin.service.ISystemUserLoginService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.newSystem.service.AdminUserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * The type User controller.
 */
@Slf4j
@Tag(name = "管理后台 - 用户")
@RestController
@RequestMapping("/newSystem/userLog")
@Validated
public class UserLogController extends BaseController {

    @Resource
    private AdminUserService userService;

    @Resource
    private ISystemUserLoginService systemUserLoginService;

    /**
     * 获取用户登录记录
     *
     * @param reqVO the req vo
     * @return the user page
     */
    @GetMapping("/userLogPage")
    public TableDataInfo userLogPage(SystemUserLogin reqVO) {
        // 获得用户分页列表
        startPage();
        return getDataTable(systemUserLoginService.getAll(reqVO));
    }
}
